package com.bdqn.ordersystem.controller;

import com.bdqn.ordersystem.service.OrderService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("/handle")
public class HandleController {

    @Resource
    private OrderService orderService;

    @RequestMapping("/view/{id}")
    public String view(@PathVariable("id") Integer id,Model model){
        model.addAttribute("order",orderService.get(id));
        return "/handle/handle_view";
    }

}
